SpatialStream® Code Examples

Browse Paths

The BrowsePath component returns a list of files that exist within a path and that match the filter parameter. In this example the BrowsePath component is searching the ACCOUNT_FOLDER/LayerList path and is asked to return all xml files specifying the value of “*.xml” as the filter. A list of files located in the ACCOUNT_FOLDER/LayerList path meeting this criteria will be displayed on the page. Using this method an application developer can create a lists of maps that are available in this account and display that list to the end user, so they can select a desired map view.

The primary benefit is to provide the application developer a means to return a list of files that exist within a path without the need to know the specific files that exist within that path.

BrowsePath

//Browse the ACCOUNT_FOLDER in the LayerLists directory for all of the .xml files.
var url = Dmp.Env.Connections["SS"].getBaseUrl() + "BrowsePath.aspx?FOLDER_NAME=ACCOUNT_FOLDER&SEARCH_PATTERN=LayerLists%2F*.xml&ShowSubdirectories=true";
url = Dmp.Env.Connections["SS"].finalizeUrl(url);
document.getElementById("pathdata").src =url;


Run Sample   View Video   Back To Index